<!doctype html>
<html>
<head>
<template source='TPL:common.head' load='true' />
<link href="{@theme:css}/forum.css?v={@G:version}" rel="stylesheet" />
<style>
.thread_page{
	padding:20px 20px 10px;
	margin-bottom:10px;
}
.forum_info_box{
	padding:15px 20px 17px;
}
/*
===================
旧版帖子列表样式
===================
*/
.thread_posts_oldlist{
	padding:0 0 15px;
	min-height:400px;
}
.thread_posts_oldlist table{
	table-layout:fixed;
}
.thread_posts_oldlist thead td{
	background:#f7f7f7;
}
.thread_posts_oldlist td{
	border-bottom:1px dashed #dcdcdc;
	padding:5px 0;
}
.thread_posts_oldlist tr.tr_check td{
	background:#ffffee;
}
.thread_posts_oldlist .icon{
	width:20px;
	padding-left:5px;
}
.thread_posts_oldlist .author{
	width:140px;
	line-height:1.2;
}
.thread_posts_oldlist .face{
	margin:2px 10px 0 0;
}
.thread_posts_oldlist .face{
	float:left;
}
.thread_posts_oldlist .face img{
	vertical-align:top;
}
.thread_posts_oldlist .author a{
	color:#666;
}
.thread_posts_oldlist .author span{
	font-size:11px;
	color:#999;
}
.thread_posts_oldlist .ordinary{
	background:#f7f7f7;
	padding:3px 0;
	color:#666;
}
.thread_posts_oldlist .num{
	width:80px;
	color:#666;
}
.thread_posts_oldlist .num em{
	color:#ff6600;
}
.thread_posts_oldlist .lastpost{
	width:120px;
	line-height:1.2;
}
.thread_posts_oldlist .lastpost a{
	color:#666;
}
.thread_posts_oldlist .lastpost span a{
	font-size:11px;
	color:#999;
}
.thread_posts_oldlist .st{
	font-size:14px;
	margin-right:3px;
}
.thread_posts_oldlist .subject{
}
.thread_posts_oldlist .subject em{
	font-size:14px;
	margin-right:5px;
}
.thread_posts_oldlist .title{
	padding-bottom:5px;
}
.thread_posts_oldlist .info,
.thread_posts_oldlist .info a{
	color:#999;
}
.thread_posts_oldlist .info span{
	margin:0 10px 0 5px;
}
</style>
</head>
<body>
<pw-start/>
<div class="wrap">
<template source='TPL:common.header' load='true' />
	<div class="main_wrap">
		<pw-tpl id="main_segment"/>
		<div class="bread_crumb" id="bread_crumb">
			{@$headguide|html}<!--# if ($tab == 'digest') { #--><em>&gt;</em><a href="{@url:bbs/thread/run?fid=$fid&tab=digest}">精华</a><!--# } #-->
			<!--# if ($type) { #--><em>&gt;</em>
				<!--# $_urladd_ = $tab ? '&tab=' . $tab : ''; #-->
				<!--# if ($_parentid = $topictypes['all_types'][$type]['parentid']) { #-->
			<a href="{@url:bbs/thread/run?fid=$fid&type=$_parentid}{$_urladd_}">{$topictypes['all_types'][$_parentid]['name']|html}</a><em>&gt;</em>
				<!--# } #-->
			<a href="{@url:bbs/thread/run?fid=$fid&type=$type}{$_urladd_}">{$topictypes['all_types'][$type]['name']|html}</a>
			<!--# } #-->
		</div>
		<div class="cc">
			<div id="cloudwind_thread_top"></div>
			<div class="">
				<pw-tpl id="first_segment"/>
				<template source='widget_forum' load='true' />
				<div id="cloudwind_threadleft_content"></div>
				<advertisement id='Thread.Top' sys='1'/>
				<pw-tpl id="thread_middle"/>
				<div class="pages_wrap cc">
					<a href="{@url:bbs/post/run?fid=$pwforum->fid}" class="btn_post J_thread_post_btn{$postNeedLogin}" data-rel="J_thread_post_types_1">发帖</a>
					<template source="widget_thread_page" />
				</div>
				<!--需要js定位-->
				<div id="J_thread_post_types_1" class="btn_post_menu" style="display:none;">
					<ul>
						<!--# foreach (($threadType = $pwforum->getThreadType($loginUser)) as $key => $value) { #-->
							<!--# $_urladd_ = ($key != 'default') ? ('&special=' . $key) : ''; #-->
						<li><a href="{@url:bbs/post/run?fid=$pwforum->fid}{$_urladd_}" data-referer="true" class="{@trim($postNeedLogin)}">{$value[0]}</a></li>
						<!--# } #-->
					</ul>
				</div>
				<div class="box_wrap thread_page J_check_wrap">
					<nav>
						<div class="content_nav">
							<!--#
							$_urladd_ = rtrim('&' . http_build_query(array('type' => $type, 'tab' => $tab)), '&');
							#-->
							<div class="content_filter"><a href="{@url:bbs/thread/run?fid=$fid}{$_urladd_}{@$defaultOrderby == 'lastpost' ? '&orderby=postdate' : ''}" class="{@Pw::isCurrent($orderby == 'postdate')}">最新发帖</a><span>|</span><a href="{@url:bbs/thread/run?fid=$fid}{$_urladd_}{@$defaultOrderby == 'lastpost' ? '' : '&orderby=lastpost'}" class="{@Pw::isCurrent($orderby != 'postdate')}">最后回复</a></div>
							<ul class="cc" id="hashpos_ttype">
								<li class="{@Pw::isCurrent(!$tab)}"><a href="{@url:bbs/thread/run?fid=$fid}">全部</a></li>
								<li class="{@Pw::isCurrent('digest' == $tab)}"><a href="{@url:bbs/thread/run?fid=$fid&tab=digest}">精华</a></li>
								<li><a href="{@url:bbs/user/run?fid=$fid}">会员</a></li>
							</ul>
						</div>
						<!--# if ($topictypes['topic_types']) { #-->
							<!--#
							$_urladd_ = '';
							$tab && $_urladd_ .= '&tab=' . $tab;
							$orderby != $defaultOrderby && $_urladd_ .= '&orderby=' . $orderby;
							#-->
						<div class="content_type">
							<ul class="cc">
								<li class="{@Pw::isCurrent(!$type)}"><a href="{@url:bbs/thread/run?fid=$pwforum->fid}{$_urladd_}">全部</a></li>
								<!--#
								foreach ($topictypes['topic_types'] as $v) {
									$subTopicTypes = $topictypes['sub_topic_types'][$v['id']];
									$currentClass = ($type == $v['id']) ? 'current' : '';
								#-->
								<li class="line"></li><li class="J_menu_drop {$currentClass}">
									<!--# if ($subTopicTypes) { #-->
									<div class="fl J_menu_drop_list"  style="margin-top:22px;display:none;">
										<div class="core_menu">
											<ul class="core_menu_list cc">
												<!--# foreach ($subTopicTypes as $v2) { #-->
												<li><a href="{@url:bbs/thread/run?fid=$pwforum->fid&type=$v2['id']}{$_urladd_}" title="{$v2['name']}">{$v2['name']|html}</a></li>
												<!--# } #-->
											</ul>
										</div>
									</div>
									<a href="{@url:bbs/thread/run?fid=$pwforum->fid&type=$v['id']}{$_urladd_}" class="drop">{$v['name']|html}<span></span></a>
									<!--# } else { #-->
									<a href="{@url:bbs/thread/run?fid=$pwforum->fid&type=$v['id']}{$_urladd_}">{$v['name']|html}</a>
									<!--# } #-->
								</li>
								<!--# } #-->
							</ul>
						</div>
						<!--# } #-->
					</nav>
					<pw-tpl id="threadTop_segment"/>
					<!--# if ($threaddb) { #-->
					<div class="thread_posts_oldlist">
						<table width="100%" id="J_posts_list" summary="帖子列表">
							<thead>
							<tr>
								<td class="icon"></td>
								<td class="subject">主题</td>
								<td class="author">作者</td>
								<td class="num">回复</td>
								<td class="lastpost">最后回复</td>
							</tr>
							</thead>
							<!--# $tpc_topped = 0; #-->
							<!--# foreach ($threaddb as $key => $value) { #-->
							<template source='widget_thread' load='true' />
							<!--# } #-->
						</table>
					</div>
					<!--# if ($operateThread) { #-->
						<div class="management J_post_manage_col" data-role="list">
							<label class="mr5"><input class="J_check_all" type="checkbox">全选</label>
							<!--# 
								$hasFirstPart = $operateThread['topped'] || $operateThread['digest'] || $operateThread['highlight'] || $operateThread['up'];
								$hasSecondPart = $operateThread['type'] || $operateThread['move'] || $operateThread['copy'] || $operateThread['unite'];
								$hasThirdPart = $operateThread['lock'] || $operateThread['down'];
								$hasFirthPart = $operateThread['delete'] || $operateThread['ban'];
							#-->
							<!--# if ($operateThread['topped']){ #--><a href="{@url:bbs/manage/topped}">置顶</a><!--# } #-->
							<!--# if ($operateThread['digest']){ #--><a href="{@url:bbs/manage/digest}">精华</a><!--# } #-->
							<!--# if ($operateThread['highlight']){ #--><a href="{@url:bbs/manage/highlight}">加亮</a><!--# } #-->
							<!--# if ($operateThread['up']){ #--><a href="{@url:bbs/manage/up}">提前</a><!--# } #-->
							<!--# if ($hasFirstPart && $hasSecondPart){ #--><i>|</i><!--# } #-->
							<!--# if ($operateThread['type']){ #--><a href="{@url:bbs/manage/type}">分类</a><!--# } #-->
							<!--# if ($operateThread['move']){ #--><a href="{@url:bbs/manage/move}">移动</a><!--# } #-->
							<!--# if ($operateThread['copy']){ #--><a href="{@url:bbs/manage/copy}">复制</a><!--# } #-->
							<!--# if ($operateThread['unite']){ #--><a href="{@url:bbs/manage/unite}">合并</a><!--# } #-->
							<!--# if ($hasThirdPart && ($hasFirstPart ^ $hasSecondPart || $hasFirstPart && $hasSecondPart)){ #--><i>|</i><!--# } #-->
							<!--# if ($operateThread['lock']){ #--><a href="{@url:bbs/manage/lock}">锁定</a><!--# } #-->
							<!--# if ($operateThread['down']){ #--><a href="{@url:bbs/manage/down}">压帖</a><!--# } #-->
							<!--# if (($hasFirstPart || $hasSecondPart || $hasThirdPart) && $hasFirthPart){ #--><i>|</i><!--# } #-->
							<!--# if ($operateThread['delete']){ #--><a href="{@url:bbs/manage/delete}">删除</a><!--# } #-->
							<!--# if ($operateThread['ban']){ #--><a href="{@url:bbs/manage/ban}">禁止</a><!--# } #-->
						</div>
					<!--# } #-->
					<!--# } else { #-->
					<div class="not_content">
						<!--# if ($tab == 'digest') { #-->
						啊哦，该版块暂没有精华帖！
						<!--# } elseif ($type) { #-->
						啊哦，该分类暂没有任何内容！
						<!--# } else { #-->
						啊哦，该版块暂没有任何内容！
						<!--# } #-->
					</div>
					<!--# } #-->
				</div>
				<div class="pages_wrap cc">
					<a href="{@url:bbs/post/run?fid=$pwforum->fid}" class="btn_post J_thread_post_btn{$postNeedLogin}" data-rel="J_thread_post_types_2">发帖</a>
					<template source="widget_thread_page" />
				</div>
				<div id="J_thread_post_types_2" class="btn_post_menu" style="display:none;">
					<ul>
						<!--# foreach ($threadType as $key => $value) { #-->
							<!--# $_urladd_ = $key ? ('&special=' . $key) : ''; #-->
						<li><a href="{@url:bbs/post/run?fid=$pwforum->fid}{$_urladd_}" data-referer="true" class="{@trim($postNeedLogin)}">{$value[0]}</a></li>
						<!--# } #-->
					</ul>
				</div>
				<pw-tpl id="thread_bottom"/>
				<advertisement id='Thread.Btm' sys='1'/>
			</div>

			<section class="face_list" style="display:none;">
				<h2 class="hd"><a href="#" class="fr fn">查看更多&gt;&gt;</a>当前在线</h2>
				<article class="ct">
					<ul class="cc">
						<!--#$online = Wekit::load('SRV:online.srv.PwOnlineCountService');#-->
						<!--#$list = $online->getLastVisitor($pwforum->fid);#-->
						<!--#foreach ($list as $value){ #-->
						<li><a href="#"><img src="{@G:url.images}/face/face_small.jpg" width="48" height="48" alt="{$value['username']}"><br />{$value['username']}</a></li>
						<!--# } #-->
					</ul>
				</article>
			</section>
		</div>
		<div id="cloudwind_thread_bottom"></div>
	</div>
<!--# if ($operateThread){ #-->
	<div id="J_post_manage_main" class="core_pop_wrap J_post_manage_pop" style="display:none;position:fixed;_position:absolute;">
		<div class="core_pop">
			<div style="width:415px;">
				<div class="pop_top"><a href="#" id="J_post_manage_close" class="pop_close">关闭</a><strong>帖子操作</strong>(已选中&nbsp;<span class="red" id="J_post_checked_count">1</span>&nbsp;篇&nbsp;&nbsp;<a href="" class="s4" id="J_post_manage_checkall" data-type="check">全选</a>)</div>
				<div class="pop_cont">
					<div class="pop_operat_list">
						<ul class="cc J_post_manage_col" data-role="list">
							<!--# if ($operateThread['topped']){ #--><li><a href="{@url:bbs/manage/topped}">置顶</a></li><!--# } #-->
							<!--# if ($operateThread['digest']){ #--><li><a href="{@url:bbs/manage/digest}">精华</a></li><!--# } #-->
							<!--# if ($operateThread['highlight']){ #--><li><a href="{@url:bbs/manage/highlight}">加亮</a></li><!--# } #-->
							<!--# if ($operateThread['up']){ #--><li><a href="{@url:bbs/manage/up}">提前</a></li><!--# } #-->
							<!--# if ($operateThread['type']){ #--><li><a href="{@url:bbs/manage/type}">分类</a></li><!--# } #-->
							<!-- <li><a href="{@url:manage/topped}">印戳</a></li>  -->
							<!--# if ($operateThread['move']){ #--><li><a href="{@url:bbs/manage/move}">移动</a></li><!--# } #-->
							<!--# if ($operateThread['copy']){ #--><li><a href="{@url:bbs/manage/copy}">复制</a></li><!--# } #-->
							<!--# if ($operateThread['unite']){ #--><li><a href="{@url:bbs/manage/unite}">合并</a></li><!--# } #-->
							<!--# if ($operateThread['lock']){ #--><li><a href="{@url:bbs/manage/lock}">锁定</a></li><!--# } #-->
							<!--# if ($operateThread['down']){ #--><li><a href="{@url:bbs/manage/down}">压帖</a></li><!--# } #-->
							<!--# if ($operateThread['delete']){ #--><li><a href="{@url:bbs/manage/delete}">删除</a></li><!--# } #-->
							<!--# if ($operateThread['ban']){ #--><li><a href="{@url:bbs/manage/ban}">禁止</a></li><!--# } #-->
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
<!--# } #-->
<template source='TPL:common.footer' load='true' />
</div>
<script>
var FID = '{$pwforum->fid}';
Wind.use('jquery', 'global', function(){
<!--# if(!$is_design) { #-->
<!--# if ($operateThread) { #-->
	//管理
	Wind.js(GV.JS_ROOT +'pages/bbs/threadManage.js?v='+ GV.JS_VERSION);
<!--# } #-->

<!--# if ($loginUser->isExists()) { #-->
	var JOIN_URL = "{@url:bbs/forum/join}",		//版块加入
			QUIT_URL = "{@url:bbs/forum/quit}",		//版块退出
			lock = false;

	//ie6 hover显示版块退出
	if($.browser.msie && $.browser.version < 7) {
		$('a.J_forum_join').hover(function(){
			if($(this).data('role') == 'quit') {
				$(this).children().show();
			}
		}, function(){
			if($(this).data('role') == 'quit') {
				$(this).children().hide();
			}
		});
	}

	//版块加入 退出
	$('a.J_forum_join').on('click', function(e){
		e.preventDefault();
		var $this = $(this),
				role = $this.data('role'),
				url = (role == 'join' ? JOIN_URL : QUIT_URL);

		if(lock) {
			return false;
		}
		lock = true;

		//global.js
		Wind.Util.ajaxMaskShow();

		$.post(url, {fid : $this.data('fid')}, function(data) {
			//global.js
			Wind.Util.ajaxMaskRemove();

			if(data.state == 'success') {
				if(role == 'join') {
					$this.html('已加入<span>&nbsp;&nbsp;|&nbsp;&nbsp;取消</span>').removeClass('core_follow').addClass('core_unfollow').data('role', 'quit');
				}else{
					$this.html('加入版块').removeClass('core_unfollow').addClass('core_follow').data('role', 'join');
				}
			}else if(data.state == 'fail') {
				//global.js
				Wind.Util.resultTip({
					error : true,
					msg : data.message,
					elem : $this,
					follow : true
				});
			}
			lock = false;
			
		}, 'json');
	});
<!--# } #-->

/*
 * 版块简介收起展开
 */
	$('a.J_forum_intro_slide').on('click', function(e){
		e.preventDefault();
		var role = $(this).data('role');

		if(role == 'down') {
			$(this).text('收起<<').data('role', 'up');
		}else{
			$(this).text('更多>>').data('role', 'down');
		}
		$('span.J_forum_intro:hidden').show().siblings('.J_forum_intro').hide();
	});

	var thread_post_btn = $('a.J_thread_post_btn');
	thread_post_btn.each(function(i, o){
		Wind.Util.hoverToggle({
			elem : $(o),						//hover元素
			list : $('#'+ $(o).data('rel')),		//下拉菜单
			callback : function(elem, list){
				list.css({
					left : elem.offset().left,
					top : elem.offset().top + elem.height()
				});
			}
		});
	});

<!--# } #-->
});
</script>
<pw-end/>
</body>
</html>